import cardRequest from '@/request/cardRequest'
import commonRequest from '@/request/commonRequest'

/**
 * 获取默认就诊人
 * @param {JSON} params
 */
function getDefaultPat(request = {}) {
  const reqBody = cardRequest.getDefaultPat(request)
  return new Promise(function(resolve, reject) {
    commonRequest.gatewayRequest(reqBody).then((res) => {
      const data = commonRequest.handleSpIhospitalResponse(res)
      resolve(data)
    }).catch((err) => {
      reject(err)
    })
  })
}

export default {
  getDefaultPat
}
